<template>
	<view class="content">
		<view class="title">
			{{ title }}
		</view>
		<view style="padding: 0 20rpx;">
			<u-parse :html="content"></u-parse>
		</view>
		

	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'',
				content:''
			}
		},
		onLoad(e) {
			console.log(e.type)
			if(e.type == 'xixie'){
				 uni.setNavigationBarTitle({ title: "洗鞋流程" });
				 this.getLiuCheng()

			}else{
				uni.setNavigationBarTitle({ title: "使用协议" });
				this.getShiYongXieYi()
			}
		},
		methods: {
			// 获取使用协议
			getShiYongXieYi(){
				uni.$u.http.post('/agreement/index').then(res =>{
					console.log(res.data)
					this.title = res.data.title
					this.content = res.data.content
				})
			},
			//获取洗鞋流程
			getLiuCheng(){
				uni.$u.http.post('/process/index').then(res =>{
					console.log(res.data)
					this.title = res.data.title
					this.content = res.data.content
				})
			},
		}
	}
</script>

<style lang="less">
.content{
	margin: 10rpx 20rpx;
	background: #FFFFFF;
	border-radius: 10rpx;
	min-height: 100vh;
}
.title{
	height: 80rpx;
	font-size: 30rpx;
	font-weight: 500;
	display: flex;
	align-items: center;
	justify-content: center;
	border-bottom: 1px solid #F1EFEF;
	margin-bottom: 30rpx;
}
</style>
